home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga CD-Sensation: Golden Games
/
Amiga CD-Sensation - Ausgabe 2 - Golden Games (1996)(GTI - Schatztruhe)(DE)[!].iso
/
Brain Activity
/
TripleYachtZ
/
ty.doc
< prev
next >
Wrap
Text File
|
1991-03-10
|
23KB
|
544 lines
Triple Yacht-Z
Version 1.2
Copyright 1991 By Stephan Iannce, and Iannce Bros. Software
(All Rights Reserved)
DISCLAIMER: If you use then program and are injured by it in anyway (maybe
you got a virus infected copy or your girl-friend throws a book
and at your head because you spend more time playing this game
than you spend with her) then I am truly sorry, but I can't
take any responsibility for this program. You use it at your
own risk. Besides I'm just a starving student and you wouldn't
make any money off of suing me anyways.
ADDITIONAL DISCLAIMER: I am not an English Major or Typist Major (I'm a
Computer Engineering Major), so any mispelings,
Typoos, or there be bad grammar, or, even bad,
punctuation; are obviously intentional just to get
attention.
I'll consider this FreeWare since I don't plan on supporting it enough to
make it shareware, although if you enjoy and use it it wouldn't hurt to
send me a little donation ($5 or so) as I'm a starving student...
You can do pretty much whatever you want with this program and it won't
bother me too much. If you include it in some commercial venture
(yeah right!) it'd be nice to send me a copy of whatever it was included
in. It would also be appreciated if you kept this file along with the
executable.
Triple Yacht-Z is my first "released" program, (I usually don't get around
to finishing the projects I start... :-() so if it isn't that great, then
I'm sorry, but it's cheap! It was written in Lattice C 5.04, and based upon
a game I enjoyed on a Mac II.
I've got the source code and wouldn't mind sharing it except that it is
pretty bad, (Although I think I got rid of that goto I used which wasn't
part of error handling... :-) ) especially the computer opponent code. I
can almost safely say it isn't really commented, but shouldn't be too tough
to read through (I use fairly descriptive variable names.) What I'm trying
to say is I'm not proud of the code (although I am of the results) but hey
it works! If you REALLY want the source code you have 2 options. Either
request I send it valid internet address, or send me a disk and SASM
(Self Addressed Stamped Mailer) so all I have to do is copy the code onto
the disk and drop it in the mail.
FILES USED
(Files with an * are not included in the distribution archive!)
ty (or whatever you've called the main executable)
ty.info - Triple Yacht-Z icon (I won't use it! CLI for me, I just included
it for those of you who use Workbench.)
YachtZ.snd - This is the Digitized sound of some jerk (me) yelling Yacht-Z
You can change this sound by renaming your own uncompressed
iff sound file here. So if you want to hear yourself (instead
of me) yelling Yacht-Z go for it!
Dice.Snd - Digitized sound of Dice rolling. You can change this one to. If
Triple Yacht-Z is unable to find this file ALL SOUND will be
turned off for the duration of the game! (The sound menu option
will be disabled.) This is because this sample is used so often
I load it into memory at the start.
ty.doc - This file!
ty.prefs - This is a preferences file that will be loaded at run-time
unless Triple Yacht-Z is invoked with the -p switch. This
file contains entries for Color Values and locations of
windows. See the PREFERENCES section for details on how to
create your own preference file. A sample ty.prefs file is
included in the distribution archive.
req.library - Colin Fox and Bruce Dawson's Requester Library. Let me say it
save a heck of a lot of work! Place this in your libs:
directory if you want to be able to use it!
*ty.high1 - This is the high score file for Single Yacht-Z. If there is
none Triple Yacht-Z will create it for you. (Isn't that nice?)
*ty.high3 - This file behaves just like ty.high1 except it's for Triple
Yacht-Z!
*ty.match - Holds the information for the last saved match
STARTING THE THING
If you want to use the color requestors and the load/save match requesters,
make sure that you have the file "req.library" in your libs: directory!
To run from CLI cd to the directory where YachtZ.snd, Dice.snd, and ty.high
are stored and just simple type: ty<RETURN> And away you go! It will open
an interlaced screen (Sorry, but the scorecard didn't fit nicely on a
non-interlaced screen) and a couple of windows. Maybe if you enjoy this
game so much and would really like to thank me you could send me a
flicker-fixer and a Multi-Sync monitor, so that I can play without the
flicker, although it's not that bad... Just annoying! :-)
There are currently only 2 command line options:
? - Gives you a list of command line options and will display the Version
number.
-s - Turns of sound for the ENTIRE game. (Disables the sound menu option).
This is useful if you are running low on chip (or Memory in general)
mem and don't want to load the 14K or so Dice.snd file into memory.
-d - Uses the default options
-r - Causes the program to forget about using the Requester library to save
memory
THE GAME
I'm not going to go into the rules of Yacht as it's a pretty widely known
game. If you don't know about the basic game you can either buy the game
Yahtzee by the E.S. Lowe Company, 200 5th Ave, NY, NY-10010, or get a
copy of Hoyle's book of games (at least my old version had Yacht in it!)
Triple Yacht-Z differs form normal Yacht in that all scores in the 3rd
column of your scorecard are worth 3 times as much as the normal value,
those in the 2nd are worth double. Note that these values are only show as
doubled or tripled in the net score space, and NOT in the the individual
columns. The 35 Bonus Points for having at least the Average on the upper
section is also doublable or triplable.
Each Yacht-Z after the 3rd is worth an extra 100 X Column used in. You MUST
score with the Yacht-Z to get these bonus points, if you score a 0 with it
no bonus points will be rewarded.
In Single Yacht-Z after the first Yacht-Z each extra will be worth 100
points. These extra Yacht-Z's (unlike in Triple Yacht-Z) may be scored
anywhere on the lower scoreboard (that still available!) or in the
appropriate upper space.
That's pretty much it for differences. There's no fancy fanfare for the
winner (maybe some later version...), he/she just get's his scorecard
highlighted. The top 10 high scores for both Triple and Single Yacht-Z are
recorded so you can prove how well you did (Of course you could always edit
the high score file... :-)) To reset the boards just delete the ty.high1
or ty.high3 files!
The Single Yacht-Z game plays just like the Triple Yacht-Z game but there's
only 1 column available to score. I only played it to make sure it works,
but I included it for those who like the original game. Note the computer
player strategy was geared towards the Triple Yacht-Z version, so don't
cry to me if they don't play as well in Single Yacht-Z!
MATCHES
A match is a series of games (up to a maximum of 51 games). After each game
the net score for each game as well as the Big Grand Total of all the nets
will be displayed for each player, and the player inb the lead will be
highlighted. Using a match will allow you to even out the chance part of the
game. Allowing you to recover from a game that you did really bad on.
While in match mode the current values for the number of players, and the
game type (i.e. Triple or Single Yachtzee) will be taken from the current
match settings rather than the Menu settings. So if you'd like to add a new
player to the match, I'm sorry, you'll just have to start a new match.
To play the next game in a match you must use the CONTINUE option from the
match menu.
To get into match mode you must select either NEW MATCH or LOAD MATCH from
the match menu. The only way to exit (without quitting the game completely)
match mode is by using the NEW GAME option from the FILE menu. Once a match
has been exitted by this means it is forgotten!!! So make sure you save the
match before you select new game if you wish to continue it later!
NOTE: If the Req.Library is either disabled (see the -r flag) or unable to
be openned Triple Yacht-Z will use "ty.match" for ALL loads and saves of
game matches!
WINDOWS
Score Card - This is where you will be placing your scores.
Dice Table - This is where the dice are rolled, and the roll and score
gadgets are located.
Computer Moves - This is where the computer will let you spy on what it is
doing. You can use the slider to adjust the speed at which
he rolls.
High Score - This is where the Triple Yacht-Z champions are immortalized!
If the color of the player is red, then he is the computer.
MENUS AND GADGETS
The spaces in the Player column are actually string gadgets!!! To give a
name to the player just simple click on the space and enter your name.
To give the computer a chance to have fun as well, just make sure the first
4 characters of the players name (under the column you want the computer
to control) are "COMP" (This isn't case sensitive). Computer opponents will
be save as "COMPUTER" and highlighted in red on the high score list. If
your name happens to be Compton or some such, then I'm sorry, because if
you enter that as your name the computer will want to play for you...
I'm not claiming the Computer is that good of an opponent as this was my
first attempt at writing code for a computer opponent, but with good roles
it can beat you! :-)
The names can be changed at any time in the game. So if you're playing
against four friends, and the third decides he's losing too badly and quits,
you can always change his name to "COMPUTER", and let the computer finish
for him. Then he can always blame the computer for losing the game. This
can also be used if you have computers playing against themselves and
decide that your memory could be put to better use. You can change one of
the computer oppenents names so that it would no longer be in control and
allow you to quit the game. Of course if I was the computer and you so
rudely interuppted one of my games, I'd probable do GURU on you...
The FAST-SLOW Slider Gadget allows you to alter the speed of the copmuter
display. If you'd like to watch what the computer is rolling at a nice
leisurely pace, just shift the knob all the way to right. If you don't give
a darn what the computer is doing put it on the left and it'll zip on
throught it's turn. It's kind of fun to put it at this speed, turn off the
sound, and then what four computer players play...
To roll click on those dice you'd like to keep. These will be highlighted
by a box drawn around them. Then clock on the ROLL gadget, and those dice
without a box around them will be re-rolled.
The program will politely show you all the places where you could possible
place your roll in red. The numbers in the spaces are the number of points
that would be received for choosing that space. To choose a space just click
on it (you can do this at anytime during you turn). Now that was easy wasn't
it?
That's pretty much the normal operation of the game. Now lets hop to the
menu choices.
FILE
NEW - If the game is waiting for a game to start this will start it
immediately. If a game is already in progress, Triple Yacht-Z
will give you a chance to confirm you really want to be a
quitter before starting another game. When a game starts the
number of players is determined by the current location of
the checkmark under the players menu. NOTE: The use of this
way to start a game will automatically stop any match in
progress. But You'll be warned if this is the case.
END GAME - Using this option will end the current game if you so
verify. You are then free to select a new match or
some other such option.
QUIT - This will of course be the least used option in the whole
game. (Clicking on the Close Window gadget on the Score Card
window will produce the same results) You will then be given
the option to correct your obviously mistaken attempt to
do something else more productive.
ABOUT - This is just here because everyone else does it, and it
lets me give my ego a little boost. Seeing my name in it
and all... :-)
SAVE PREFS - This will auto-magically add the current window
locations (or lack thereof as in the case of a closed
high-score window), and the Computer Speed, sound,
number of players, and game type settings to the
ty.prefs file. The old file will be deleted if it
existed!
HIGH SCORES - If the high score window has been closed this will
re-open it for you. Isn't that special?
COMPUTER - Does the same thing as HIGH SCORES except it opens the
Computer Moves window.
PLAYERS
You can select the number of players you want in the game by
choosing the correct item. This value is only read at a new game
attempt.
MISC
UNDO - Lets you UNDO one move. You can't UNDO a computer move.
You can also use this to cheat by giving you another chance
to roll that extra 4 you needed to get a yacht-Z.
WARNING: Only do this if your opponents are looking the other
way! As I said before, I'll take no responsibility for your
friends beating you up because you cheated. But then if your
already big (such as a linebacker or such) then why not?!?!
Although it's probably good ettiquete to make sure that all
the rest of the players allow your use of the UNDO function
because you want to be fair right?!?!?
SOUND - This is a toggle. If there is a checkmark next to this item
you will be able to hear the astounding sound effects. If
not then you can enjoy the sounds of silence. If this item
is ghosted then that means there was an error allocating a
sound channel, couldn't find the Dice.snd, or some other
fatal sound problem, and you will not be given the
opportunity to listen to the sound until after you quit
and restart.
NOTE: Turning the sound off will considerably speed up the
game as it won't have to play the dice rolling sound each
times it rolls. So if you wanted to get into the Guiness
Book of World Records for playing the most Triple Yacht-Z
games in an hour, this is the option for you!
PALETTE - This calls up a color requester to allow you to alter the
colors to your own choosing!
VERSION
SINGLE YACHT-Z - Use the Single Yacht-Z rules
TRIPLE YACHT-Z - Use the Triple Yacht-Z rules
Note that the current value of this menu is only checked at the
start of a new game. So don't expect to screw your opponnent
over by switching to Single Yacht-Z when he gets up to go get
a Coke. (Note Coke is a Trademark of the Cocoa-Cola company. But
we all know that <real> programmers drink Jolt. :-))
MATCH
(NOTE: This menu will only be active while the computer is waiting)
(for a new game to start. Thus if you are in the middle of a game )
(And you friend drops by to continue your match you'll have to use)
(END GAME to be able to access this menu! )
NEW MATCH - This will start a new Match for you.
CONTINUE - This will start the next game in the match.
LOAD MATCH - This will load the currently saved match and allow you
to CONTINUE where you left off.
SAVE MATCH - This save the current match so you can come back and
play later.
PREFERENCES
The ty.prefs file consists 3 Letter mnenomics (is that how it's spelled?)
starting on the first character of a new line. Their arguments follow
directly. This was done as a quick-and-dirty type implemtation, and isn't
really forgiving on format. Don't leave any blank lines because that will
make it cause you trouble!
MNENOMIC
COL
This will change the default colors.
Each subsequent hexadecimal digit will be assigned to the following
locations. (Note white space is ignored!)
1st - Color to Change (Range of 0-3)
2nd - Red Value
3rd - Green Value
4th - Blue Value
EXAMPLE:
COL0F0F
This will set color 0 to a purple color (15 bits of Red,
0 Bits of Green, and 15 bits of Blue)
WIN
The first int read in is the window number which refer to the
following:
0 - ScoreBoard Window
1 - Dice Window
2 - High Score Window
3 - Computer Moves Window
the next two integers will be the x,y pixel locations of the upper
left corner of the window. If the value supplied will put the
window over the edge of the window, a maximum value will be
substituted. All number here must be seperated by a non-digit
character!
NOS
Means start game without openning the high score window.
NOC
Means start game without openning the computer move window.
END
This signifies the end of the prefs file. If you don't use this
you'll get an error message, but all previously accepted commands
will be used.
SND
The next character immediately following the directive will be the
current setting of the sound flag. The settings available are:
0 - Sound is Turned OFF
1 - Sound is Turned ON
2 - Sound is out for the rest of the game. (As in the -s runtime
flag
SPD
The integer following this command will be the current percentage
of full delay for the computer. The integer must be in the range
of 0 and 65535 (where 65535 = 100% and 0 = 0%). The higher this
number the slower the computer display will be! It's probably best
to just slide the knob where you want it and then use the save
prefs command.
PLY
The number immediately following the dirrective will be the number
of players to start with
GAM
The number immediately following this directive will be the current
value of the game type flag. Current available settings are:
0 - Single Yacht-Z
1 - Triple Yacht-Z
UPDATES!!!
Gee I actually added an Update section to the docs! And I didn't even
expect to get past v1.0!
V1.1 -
-Adds the Version #'s to the Triple Yacht-Z Screen's Title Bar
-Added the Version # to the Documentation!
-Now uses a 4 color hi-res interlaced screen instead of an eight
color screen. (Saves some chip mem!)
-Put in a Single Yacht-Z version for those who want to play the
single version!
-Added the ty.prefs file for those who want to customize their
own Triple Yacht-Z tables!
-Now highlights the winner.
-Close Gadgets added to Computer and High Score Window in case you
want to run a real lean version
-There is now (Guess there couldn't have been before!) a seperate
highscore list for both single and triple Yacht-Z.
-Fixed a bug whereby if you clicked on the roll gadget twice in a
row on your third roll, it would score some wierd value. All in
all it wasn't very nice so I fixed it! :-)
-Fixed a rather nasty bug whereby in certain circumstances the
computer would score a four of a kind in a space that was already
filled. This would leave a blank score after all was said and done.
Sorry about that one!
-Fixed something that could be considered a feature but I don't
think so, so I "fixed" it. If the computer had a Yacht-Z available
and all the 3 and 4 of a kinds, as well as the applicable upper
score available, the computer would re-roll even if it had at
least two of kind...
-Added a match menu so you can play series of games and tabulate
the scores!
V1.2 -
-Updated this DOC file again... :-)
-Fixed a bug (I hope) whereby points for extra yacht-z's were given
which weren't deserved.
-Fixed the "bug" whereby the bonus for >= average on the upper
scorecard is now 35 instead of 32.
-Fixed a couple undo function bugs (I told you there were some!) Of
course with some of the changes I made this required a re-write of
the undo stuff so I may have inserted some more! :-)
-Fixed a bug in the high score routines where if there was no high
score file when TY tried to load it save any current high scores
over that list...
-Fixed a bug whereby Bonus points for extra Yacht-Z's where not
removed after an undo...
-The scoreing possibilities of extra yacht-z's in the single yacht-z
game have been altered. Basically you now get the normal score for
lower scores and can only score an extra yacht-z in upper section
if it will "fit"
-Changed the dice window so that only the roll gadget remains. You
can click at anytime in the scorecard to score your roll! (My
brother's idea.)
-Undo will now allow you to undo the last move just before the last
computer player. For example if you're playing against the
computer and you score a Yacht-Z as a scrath on the upper score
board you can undo that as soon as the copmuter has finished his
moves. Play will then continue with whoever was playing before
the undo was used.
-Thanks to Colin Fox and Bruce Dawson's excellent requester library
(I didn't feel like making one! whew!) we now have a pallete
requester to allow you to alter your colors without editting the
ty.prefs file. Makes altering your scoring table a H*ll of alot
easier!
-Also thanks to the requester lib save and load match will now let
you use a requester to save your matches as whatever you want!
-Added a command line switch to avoid loading the Requester Library
in case you don't want to use anymore memory!
-Save Prefs now save the current color information because there's
now a way to easily change the colors during play.
-NOTE:Save Prefs nows deletes the old "ty.prefs" file and save the
new one on top of it!
-I don't know when I'll get around to releasing a new version, the
only reason I'm releasing this is because there were some really
bad bugs lying around that I was kind of embarassed of. So if
you've got a neat idea or feature you'd like to see me implement,
or God forbid another bug, send me a note. If I get enough requests
I'll do another version, although currently I'm working on an even
neater project, a Dungeon construction kit for (Actually tools for
making one) along the lines of the Wizardry Genre... Although you'd
better give me a couple months on that one!
CREDITS
This program was Written by Me: Stephan Iannce
Special Thanks goes to Colin Fox (Pyramyd Designs) & Bruce Dawson (of
CygnusSoft Software) for their wonderful ReqLibrary of which Version 2.5 is
used here.
Playtester: F Brian Iannce (He wanted his name in the docs... :-))
You can get in touch with me about improvements, bugs, or just to chat ( I
like getting mail! (Seems like a lot of people do!)) through my UN*X
account:
siannce@polyslo.CalPoly.edu
or through Snail Mail:
Stephan Iannce
173 Buena Vista Ave
San Luis Obispo, CA 93405
Feel free to send donations ($5 or so), suggestions for additions or
improvements, or bug reports!
Thanks for using my program! Until next time! (Hey! That's a incomplete
sentance!)